Optimal. Leaf size=84 \[ -\frac {a \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a^3}{8 d (a-a \sin (c+d x))^2}-\frac {a^2}{4 d (a-a \sin (c+d x))}-\frac {a^2}{8 d (a+a \sin (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2915, 12, 90,
212} \begin {gather*} \frac {a^3}{8 d (a-a \sin (c+d x))^2}-\frac {a^2}{4 d (a-a \sin (c+d x))}-\frac {a^2}{8 d (a \sin (c+d x)+a)}-\frac {a \tanh ^{-1}(\sin (c+d x))}{8 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 90
Rule 212
Rule 2915
Rubi steps
\begin {align*} \int \sec ^3(c+d x) (a+a \sin (c+d x)) \tan ^2(c+d x) \, dx &=\frac {a^5 \text {Subst}\left (\int \frac {x^2}{a^2 (a-x)^3 (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^3 \text {Subst}\left (\int \frac {x^2}{(a-x)^3 (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^3 \text {Subst}\left (\int \left (\frac {1}{4 (a-x)^3}-\frac {1}{4 a (a-x)^2}+\frac {1}{8 a (a+x)^2}-\frac {1}{8 a \left (a^2-x^2\right )}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^3}{8 d (a-a \sin (c+d x))^2}-\frac {a^2}{4 d (a-a \sin (c+d x))}-\frac {a^2}{8 d (a+a \sin (c+d x))}-\frac {a^2 \text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,a \sin (c+d x)\right )}{8 d}\\ &=-\frac {a \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a^3}{8 d (a-a \sin (c+d x))^2}-\frac {a^2}{4 d (a-a \sin (c+d x))}-\frac {a^2}{8 d (a+a \sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 74, normalized size = 0.88 \begin {gather*} -\frac {a \tanh ^{-1}(\sin (c+d x))}{8 d}-\frac {a \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {a \tan ^4(c+d x)}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.14, size = 88, normalized size = 1.05
method | result | size |
derivativedivides | \(\frac {a \left (\frac {\sin ^{3}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{8}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {a \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}}{d}\) | \(88\) |
default | \(\frac {a \left (\frac {\sin ^{3}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{8}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {a \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}}{d}\) | \(88\) |
risch | \(\frac {i a \left (6 i {\mathrm e}^{4 i \left (d x +c \right )}+{\mathrm e}^{5 i \left (d x +c \right )}-6 i {\mathrm e}^{2 i \left (d x +c \right )}+6 \,{\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}\right )}{4 \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{4} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{2} d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}\) | \(129\) |
norman | \(\frac {\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {2 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {7 a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {2 a \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {a \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {4 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(187\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 84, normalized size = 1.00 \begin {gather*} -\frac {a \log \left (\sin \left (d x + c\right ) + 1\right ) - a \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (a \sin \left (d x + c\right )^{2} + 3 \, a \sin \left (d x + c\right ) - 2 \, a\right )}}{\sin \left (d x + c\right )^{3} - \sin \left (d x + c\right )^{2} - \sin \left (d x + c\right ) + 1}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 135, normalized size = 1.61 \begin {gather*} \frac {2 \, a \cos \left (d x + c\right )^{2} - {\left (a \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) - a \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (a \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) - a \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 6 \, a \sin \left (d x + c\right ) + 2 \, a}{16 \, {\left (d \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) - d \cos \left (d x + c\right )^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.53, size = 91, normalized size = 1.08 \begin {gather*} -\frac {2 \, a \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - 2 \, a \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (a \sin \left (d x + c\right ) - a\right )}}{\sin \left (d x + c\right ) + 1} + \frac {3 \, a \sin \left (d x + c\right )^{2} - 14 \, a \sin \left (d x + c\right ) + 7 \, a}{{\left (\sin \left (d x + c\right ) - 1\right )}^{2}}}{32 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 14.46, size = 167, normalized size = 1.99 \begin {gather*} -\frac {a\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d}-\frac {\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}+\frac {5\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________